package com.SoftwareManage.dao;

import com.SoftwareManage.entity.Cae;
import com.SoftwareManage.entity.Permission;
import com.SoftwareManage.entity.Role;
import com.SoftwareManage.entity.RolePermission;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface PermissionDao {
    //获取所有信息
    List<Permission> selectAll();
    //获取分页后的诊断信息
    List<Permission> selectAlls(@Param("page") int page,
                         @Param("pageSize") int pageSize);

    //查询
    List<Permission> search(@Param("permission_name") String permission_name);

    //获取分页后的查询信息
    List<Permission> searchs(@Param("permission_name") String permission_name,
                                 @Param("page") int page,
                                 @Param("pageSize") int pageSize);

    //修改信息
    void update(@Param("id") int id,
                @Param("permission") String permission,
                @Param("permission_name") String permission_name,
                @Param("remark") String remark);


    //查找所有权限
    List<String> selectAllPermissions();

    //添加权限
    void addPermission(@Param("permission") String permission,
                       @Param("permission_name") String permission_name,
                       @Param("remark") String remark);

    //删除权限
    void deletePerm(@Param("id") int id);
}
